package com.yanqu.road.server.cmd.activity.businessreunion;

import com.yanqu.road.pb.activity.BusinessReunionProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.businessreunion.BusinessReunionMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;
import io.netty.channel.ChannelHandlerContext;

/**
 * @author ：zfr
 * @date ：2022/4/19 17:40
 */
@Cmd(code = GameProtocol.S_CROSS_SYNC_BIND_ADD_VIP_EXP, desc = "同步召回绑定后增加的vip经验")
public class CrossSyncBindAddVipExpCmd implements Command {
    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        BusinessReunionProto.SyncBindPlayerAddVipExpMsg syncMsg = BusinessReunionProto.SyncBindPlayerAddVipExpMsg.parseFrom(packet.getBytes());
        BusinessReunionMgr.syncAddVipExp(syncMsg.getSyncToUserId(), syncMsg.getRecallUserId(), syncMsg.getAddVipExp());
    }
}
